/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main {
    padding: 30px;
}

/* 密码显示区域 */
.password-section {
    margin-bottom: 30px;
}

.password-container {
    display: flex;
    margin-bottom: 15px;
    position: relative;
}

#password-output {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    border: 2px solid #e1e5e9;
    border-radius: 8px 0 0 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

#password-output:focus {
    border-color: #4facfe;
}

.copy-button {
    background: #4facfe;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-button:hover {
    background: #00f2fe;
    transform: translateY(-1px);
}

.copy-button:active {
    transform: translateY(0);
}

/* 密码强度指示器 */
.strength-indicator {
    margin-top: 15px;
}

.strength-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.strength-bars {
    display: flex;
    gap: 4px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background-color: #e1e5e9;
    transition: all 0.3s ease;
}

/* 不同强度的样式 */
.strength-weak .strength-bar:nth-child(1) {
    background-color: #ff4757;
}

.strength-fair .strength-bar:nth-child(1),
.strength-fair .strength-bar:nth-child(2) {
    background-color: #ffa502;
}

.strength-good .strength-bar:nth-child(1),
.strength-good .strength-bar:nth-child(2),
.strength-good .strength-bar:nth-child(3) {
    background-color: #2ed573;
}

.strength-strong .strength-bar {
    background-color: #1e90ff;
}

/* 配置选项区域 */
.options-section {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 20px;
}

.option-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* 滑块样式 */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.3s;
}

.slider:hover {
    background: #d1d5d9;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4facfe;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 172, 254, 0.3);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: #00f2fe;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 242, 254, 0.4);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4facfe;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(79, 172, 254, 0.3);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    background: #00f2fe;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 242, 254, 0.4);
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.checkbox-group:last-child {
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4facfe;
}

.checkbox-group label {
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.checkbox-group label:hover {
    color: #4facfe;
}

/* 生成按钮 */
.generate-button {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.4);
}

.generate-button:active {
    transform: translateY(0);
}

.generate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 统计信息区域 */
.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4facfe;
}

/* 底部信息 */
.footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.footer p {
    font-size: 0.9rem;
    color: #666;
}

/* 提示框样式 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 0;
    }
    
    .header,
    .main {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .password-container {
        flex-direction: column;
    }
    
    #password-output {
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .copy-button {
        border-radius: 8px;
        padding: 12px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p,
    .footer p {
        font-size: 0.9rem;
    }
    
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}